// This is the Java equivalent of Tool's Exception class

public class ToolException extends Throwable {

	// the error message
	protected String msg;

	// gets the error message
	public String getMessage(){
		return msg;
	}

	// sets the error message, has return type int because Tool doesn't know of void type
	public ToolException setMessage(String msg){
		this.msg = msg;
		return this;
	}
}
